//
//  LSArrowsView.m
//  LookScore
//
//  Created by wr on 2018/2/22.
//  Copyright © 2018年 ChongQingXunTiCompany. All rights reserved.
//

#import "LSArrowsView.h"

@implementation LSArrowsView

-(instancetype)initWithFrame:(CGRect)frame{
    self=[super initWithFrame:frame];
    if (self) {}
    return self;
}


-(void)drawRect:(CGRect)rect
{
    
    
    //定义画图的path
    UIBezierPath *path = [[UIBezierPath alloc] init];
    
    //path移动到开始画图的位置
    [path moveToPoint:CGPointMake(rect.origin.x, rect.origin.y)];
    //从开始位置画一条直线到（rect.origin.x + rect.size.width， rect.origin.y）
    [path addLineToPoint:CGPointMake(rect.origin.x + rect.size.width, rect.origin.y)];
    //再从rect.origin.x + rect.size.width， rect.origin.y））画一条线到(rect.origin.x + rect.size.width/2, rect.origin.y + rect.size.height)
    [path addLineToPoint:CGPointMake(rect.origin.x + rect.size.width/2, rect.origin.y + rect.size.height)];
    
    //关闭path
    [path closePath];
    
    //三角形内填充颜色
    [LSSubGrayColorf7 setFill];
    
    [path fill];

}
/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect {
    // Drawing code
}
*/

@end
